<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <meta name="keywords" content="xx,xx,xx" />
    <meta name="description" content="yyyyyyy" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta property="qc:admins" content="70003766576320416375" />
    <meta name="format-detection" content="telephone=no">
    <title>提现</title>
    <link rel="stylesheet" href="../css/base/jquery-ui-1.10.3.css" type="text/css">
    <link rel="stylesheet" href="../plugin/bootstrap-3.3.7/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/job.css">
    <link rel="stylesheet" href="../css/withdraw.css">
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body style="background: #f1f1f1">
<div class="container-fluid" style="background-color: #f7f7f9">
    <!--header start-->
    <div class="row header">
      <div><span id="back" class="glyphicon  glyphicon-chevron-left" style="float: left;cursor: pointer;"></span>提现</div>
    </div>
        <!--header end-->

    <!--content start-->
    <div class="row content">
        <div class="show-box withdraw">
            <h5>
                <span>到账银行卡</span>
                <span style="color: #006699;margin-left: 20px">农业银行（尾号4572）</span>
                <a href="bank-card.html"><span class="glyphicon glyphicon-chevron-right" style="float:right; color: white; line-height:2;"></span></a>
            </h5>
            <h5>
                <span>提现金额</span>
                <span class="glyphicon glyphicon-yen" style=" font-size: 20px;">
                    <input type="text" id="cash" >
                </span>
            </h5>
            <h5>
                 <span style="font-size: 18px;">
                    <small>可用余额<span class="glyphicon glyphicon-yen">35.00</span>皇币（元）</small>
                    <small id="withdraw" style="margin-left: 20px;color: #006699;cursor: pointer;">全部提现</small>
                </span>
                 <small id="alert" >提现金额不能大于总余额</small>
            </h5>
            <h5><button class="btn btn-button" id="sign-up" disabled>48小时到账，确认提现</button></h5>
        </div>
    </div>
    <!--content end-->
</div>
</body>
<script src="../js/common/jquery-2.1.4.min.js"></script>
<script src="../js/index.js"></script>
<script src="../plugin/bootstrap-3.3.7/dist/js/bootstrap.min.js"></script>
<script>
$(function(){
     var cash= $('#cash');
     var btn= $('#sign-up');
          cash.focus();
    cash.blur(function(){
        change_cash();
    });

    $('#withdraw').click(function(){
        var $get_cash=$(this).prev().find('span').text();
        $('#cash').val($get_cash);
        change_cash();
    });

    btn.click(function(){
        alert('您已提现，我们会在48小时内进行处理');
        location.reload();
    });

    function change_cash(){
        var $get_cash=cash.parents('h5').next().find('small>span').text();
        if(parseInt(cash.val())>parseInt($get_cash)) {
            $('#alert').css('display','block');
            btn.attr('disabled',true);
        }
        else{
            $('#alert').css('display','none');
            if($('#cash').val()!==''){
                btn.attr('disabled',false);
            }
        }
    }


});
</script>
</html>